<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-02-16 11:11:34
 * @Last Modified time: 2023-02-16 14:18:27
 */
namespace app\common\dao\pay;

use frank\base\BaseDao;
use app\common\model\pay\RefundModel;

/**
 * Class RefundDao
 * @package app\common\dao\pay
 */
class RefundDao extends BaseDao
{
    /**
     * 设置模型名
     */
    protected function setModel(): string
    {
        return RefundModel::class;
    }

    /**
     * 生成单号
     */
    public function refundNo()
    {
        return date('YmdHis') . substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 10);
    }
}
